package PTA.javaB;
import java.util.Scanner;
public class ex01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a=sc.nextInt();
        float b=sc.nextFloat();
        int x1=sc.nextInt();
        int x2 = sc.nextInt();
        int x3=sc.nextInt();
        System.out.printf(Integer.toString(a,10));
        System.out.printf(" ");
        System.out.printf(Integer.toString(a,8));
        System.out.printf(" ");
        System.out.printf(Integer.toString(a,16));
        System.out.printf("\n");
        System.out.printf("%6.2f\n",b);
        System.out.printf("%5d %5d %5d\n",x1,x2,x3);
        System.out.printf("%5d %5d %5d\n",x2,x3,x1);
        System.out.printf("%5d %5d %5d",x3,x1,x2);
    }
}
